Control of industrial machinery and processes frequently requires achieving various states at precise times. For example, in an industrial robot, it may be necessary to move an armature from a standby position to a ready position within a specified interval. A motion-control system, such as a servomotor, can be used to execute time-dependent movements by, for example, controlling an armature according to user-defined constraints.
In sophisticated applications, the parameters governing the final state may be complex. It may be necessary to specify not only the final position of the armature at a time t, for example, but also its velocity and even acceleration at that position. Suppose a programmable controller is used to control the motion of a label applicator, which affixes labels to cartons moving along a conveyor belt. The applicator must not only move the label into a position directly adjacent a carton as it passes, but must also be moving at the speed of the carton at this point. The controller must therefore be capable of generating motion that will achieve target positions and velocities at specified times, which may themselves change if the cartons move at a non-uniform rate. Similar time-dependent state control may also occur in industrial processes. For example, a thermostat may be configured to attain target temperatures in a process tank, which is heated by a burner whose intensity can be controlled. The temperature responsiveness of the tank may be modeled as a function of time, the intensity of the applied heat and the initial temperature, and the burner controlled in accordance with this model to bring the tank to various target temperatures at specified times.
For simplicity of presentation, the following discussion is directed toward motion control, since these systems are so common and well-characterized in terms of state control. A conventional motion-control system may utilize a dedicated component or software module to govern servomotor operation. Called a "profile generator," this component operates as part of or in concert with a programmable controller that supervises the operation of the machinery of which the servomotor is a part. The profile generator, in turn, sends signals to a "position controller" that sends control signals to the motor, which is equipped to respond to those signals (either directly or by means of a motor driver).
It is important, in understanding the function of the profile generator, to distinguish its role from those of the supervisory controller and the position controller. The supervisory controller may specify various target states of the motor's armature and the times at which these states are to occur. A "state" refers to the values of a set of parameters relevant to the controlled operation--i.e., motion. These parameters may include, for example, an absolute position, velocity, and acceleration; for the state to be attained, the motion of the armature must conform, generally at a predetermined time (which represents one of the parameters of the target state), to all parameter values specified in the state. The supervisory controller defines overall start and end states for the motion, and ordinarily will decompose that motion into a "trajectory," or series of contiguous paths. Each path is a series of states and is defined by its own start and end states and the way the system changes from the start to the end state. The end state of any path (other than the last) is also the start state of the next path. These states are fully determined in terms of all relevant variables, and represent "control points" (or "waypoints") that collectively define the path. Each waypoint represents the final state of one path and the initial state of the next path.
The profile generator establishes a more detailed series of paths through which the armature travels in order to traverse the paths specified by the supervisory controller, and to satisfy the requirements for the specified states at the predetermined times. This may include defining additional waypoints within the paths defined by the supervisory controller. Accordingly, the motion is not merely the directional route followed by the armature, but a sequence of states (which include the specified states).
The concept of state paths is a general one not confined to the domain of motion control. As understood in the art, a state path is a train of states (which may be defined continuously or discretely, in terms of control points) that describes how the system changes from the initial state to the final state. The path extends through the space of all possible system states, where the space is defined by a series of axes or dimensions each corresponding to a parameter relevant to system operation; each individual state is then a set of values for each parameter. These parameters may be measured directly or computed from other, measured parameters.
A simple controller may explicitly control only a single parameter. For example, servo controllers are usually either position controllers or velocity controllers in that the controller itself can keep only the actual position or the actual velocity equal to a commanded value. A position controller, however, can achieve some control of the velocity by having the profile generator change the desired position at a rate corresponding to the desired velocity. Similarly, varying the desired velocity allows the acceleration to be specified. More advanced controllers are of course possible. For example, the state-space concept may control multiple parameters of a state simultaneously (as in so-called multivariable controllers). The profile generator does not control the state of the system along the calculated path; this function is performed by the position controller in a motion control system. The profile generator also does not itself perform control functions (i.e., autonomously alter the path in response to changing system conditions); these are carried out by the supervisory controller. Although the profile generator may compute a new path in response to a command from the supervisory controller, it does not exert control over the operated system. Instead, it translates the general motion requirements of the supervisory controller into a detailed sequence of desired positions for the position controller.
Thus, in a typical motion-control system, the supervisory controller determines one or more target states of the motor's armature at given times based on its operation of the overall machinery, or in response to external (e.g., operator-provided) signals, and issues a command to the profile generator specifying the target state (which may include the time); in other words, the supervisory controller sets the profile parameters (i.e., the sequence of trajectories) and initiates motion. The profile controller computes the armature movements--that is, the path--necessary to achieve the desired states and issues, to the position controller, commands invoking these movements. In general, the path is defined in terms of a series of control points that include the states specified by the supervisory controller. The position controller, responding to these commands, controls the motor. For example, in a servomotor system, the position controller dictates the current applied to the motor, and hence its torque; whereas in a stepper motor system, the position controller issues pulses, the frequency of which determines the overall rate at which the rotor turns.
The system may also include a position-feedback unit that determines the actual state of the armature in order to ensure that the actual armature position corresponds to the position commanded by the position controller. In simple systems this position feedback is not made available to the profile generator. In such "open-loop" systems, the profile generator remains uninformed of the actual responses of the motor, assuming that the desired state is reached at each cycle (i.e., that the position controller successfully accounts for variation in the performance of the motor); in other words, the state at the beginning of a new cycle is taken as the commanded state from the previous cycle. In "closed-loop" systems, by contrast, the profile generator receives feedback information at the end of each cycle, using the actual measured position of the armature in computing motion for the next cycle.
The supervisory and position controllers of the system may also be configured in an open-loop (i.e., having no position-feedback element) or closed-loop (equipped with position feedback) configuration, regardless of the configuration of the other elements, subject to physical limitations (e.g., a servo controller cannot be open loop). Where more than one of the supervisory controller, the position controller and the profile generator are closed-loop systems, the same position-feedback element may be common to multiple subsystems; alternatively, the different modules may have separate position-feedback elements.
As noted above, the supervisory controller typically divides a motion profile into trajectories and, more finely, paths. The profile generator typically divides paths into "cycles" i.e., segments of a path. Complex motions are achieved through smooth catenation of different paths and segments into a single motion trajectory; smoothness is ensured by maintaining sufficiently small time lags between segments (a typical cycle time is 0.5 msec) and by the mechanical inertia of the system, thereby ensuring that the changes in parameters between cycles are not large. Breaking a desired motion into segments also allows for correction of errors before they become large, and also for real-time modification of the path of motion. A motion may therefore be defined by a sequence of specific states or control points, each achieved by successive cycles, or by a mathematical relationship relevant to the operation of the controlled machine. Even in the latter case, control points are typically defined in order to establish waypoints and smaller paths and to permit corrections to be made throughout the course of the motion.
Conventional profile generators may operate by solving the equations of motion applicable to the controlled motor for each path. For example, if acceleration is restricted to a linear function of time (a so-called linear motion profile), three equations specify acceleration, velocity, and position as first-, second-, and third-order functions of time, respectively. Solving these equations explicitly provides a mathematical model of motion, which can be used to specify the linear acceleration profile needed to take an initial position and velocity (at the beginning of the path) to a target position and velocity (at the end of the path).
There are several problems with this approach. First, the general equations must be solved in order to determine coefficient values for the actual motion equations. This must be accomplished whenever the target state changes or when the system determines That the current actual state is too far from the desired state. Moreover, evaluating the system of three equations at each cycle requires substantial computational power given the short allowable time between cycles. This difficulty can be ameliorated in accordance with U.S. Pat. No. 5,770,829, which utilizes information about the current state and the target state to reduce the computation necessary to obtain the initial acceleration. In particular, it is unnecessary to compute the coefficients of the three equations of motion. Moreoever, because acceleration is assumed to be a linear function of time, specifying the initial acceleration and the rate of change of acceleration is sufficient to obtain a target velocity and position.
The utility of this approach breaks down, however, when the acceleration is non-linear, or when higher-order terms must be considered. For example, in many applications, it is necessary to specify (or at least minimize) "jerk"--i.e., the rate of change of acceleration with time, or ##EQU1## (where P is position). Indeed, merely specifying a linear acceleration in order to achieve a target velocity can actually ensure the occurrence of jerk at the target position if the speed is to remain constant for the succeeding path. An initial acceleration changes linearly with time until the target state is reached, after which it falls immediately to zero--thereby imparting substantial jerk to the system at the end of the path. If, alternatively, the path is defined in such a way that the final acceleration is zero (which will usually require additional computation by the supervisory controller), then the acceleration must be nonzero at the start of the path and jerk will be introduced at that time.
The process of evaluating a set of equations for the motion at each cycle also poses problems when the target state of the path is changed. For example, the target may shift in response to some change in the external system (e.g., if the box to be labeled slips on the conveyor, or is misplaced) or simply because the target is determined dynamically by some inputs to the system. Change of the target state requires recalculation of the parameters for the equations using the new end state and, in general, a new initial state before the equations themselves can be evaluated. Accordingly, not only must the equations be evaluated every cycle; it is also necessary, when the target is changing, to periodically recalculate the parameters for the equations. Once again, for the restricted case where the acceleration is linear, these recalculations may be avoided when using the techniques described in the No. '829 patent.
It is also necessary, in the case of a changing target, for the system (either the supervisory controller or the profile generator) to monitor the system input parameters that define the target and identify when they have changed sufficiently to require recalculation of the motion parameters. This is a non-trivial problem to solve for the general case, and may pose particular computational demands to ensure timely responses to changes in the target.
Still further problems may be caused practical limitations on the accuracy of mathematical representations and calculations, which are restricted by the limited time for computation and the limited resolution of digital representations of numerical values. These create inaccuracies both in the determination of the parameters for the equations of motion and during the evaluation of these equations. Since the equations themselves are dependent on time, which is always increasing, the magnitude of these errors will also increase with time. Accordingly, it becomes necessary to periodically check for excessive errors (in itself not a trivial task), further increasing the computational burden on the system.
Finally, in open-loop systems or in cases where the quality of position control is compromised by exceeding system capabilities (e.g., requiring a torque larger than the system can provide), problems may be encountered when the actual position is no longer close to the required position. In particular, this condition may cause additional jerk when changing between paths.